package com.aixx.springcloud.alibaba.service;

import com.aixx.springcloud.alibaba.domain.CommonResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.Mapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * @author shkstart
 * @create 2021-02-18 0:21
 */

@FeignClient(value = "seata-storage-service")//利用openfeign调用其他微服务
public interface StorageService {
     //产品的id减少数量
    @PostMapping("/storage/decrease")
     CommonResult decrease(@RequestParam("productId") Long productId,@RequestParam("count") Integer count);
}
